package com.sunshine.androidjavapractise.socket;

import android.support.annotation.NonNull;

public class SocketHelper {
    private SocketClient mSocketClient;

    public SocketHelper(String ip, String port) {
        mSocketClient = new SocketClient(ip, port);
        mSocketClient.registerSocketClientDelegate(new SocketClientDelegate() {
            @Override
            public void onConnected(SocketClient client) {

            }

            @Override
            public void onDisconnected(SocketClient client) {

            }

            @Override
            public void onResponse(SocketClient client, @NonNull SocketResponsePacket responsePacket) {

            }
        });
        connect();
    }

    public void connect() {
        mSocketClient.connect();
    }

    public void disConnect() {
        mSocketClient.disConnect();
    }
}
